<template>
  <basic-video ref="video" :width="350">
  </basic-video>
</template>

<script>
import basicVideo from '/src/szcomponent/avue/basic-video/main.vue'
import {useUserStore} from "../../store/modules/user.js";
import {mapState} from "pinia";
import {useNavsStore} from "../../store/modules/tags.js";

export default {
  components: {
    basicVideo
  },
  data() {
    return {
      loginForm: {
        username: "admin",
        password: "123456",
      }

    }
  },
  created() {
    setTimeout(() => {
      this.handleLogin()
    }, 6000)
  },
  computed: {
    ...mapState(useNavsStore, ["tagWel"])
  },
  methods: {
    handleLogin() {
      const userStore = useUserStore()
      userStore.LoginByUsername(this.loginForm).then(() => {
        this.$router.push(this.tagWel);
      });
    }
  }
}
</script>

<style>
</style>